﻿cmake_minimum_required(VERSION 3.8)

project(SWidget VERSION 1.0 LANGUAGES CXX)

set(CMAKE_AUTOMOC ON)
#set(CMAKE_AUTOUIC ON)
#set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt6 COMPONENTS REQUIRED Widgets)

file(GLOB SWIDGET_ITEMDELEGATE_CPP "${CMAKE_CURRENT_LIST_DIR}/ItemDelegate/*.cpp")
file(GLOB SWIDGET_CPP "${CMAKE_CURRENT_LIST_DIR}/*.cpp")
file(GLOB SWIDGET_H "${CMAKE_CURRENT_LIST_DIR}/*.h")

add_library(${PROJECT_NAME} STATIC ${SWIDGET_CPP} ${SWIDGET_ITEMDELEGATE_CPP} "ItemDelegate/EnableSwitchDelegate.h" "SSwitchButton.cpp" "SSwitchButton.h" "ItemDelegate/ButtonDelegate.cpp" "ItemDelegate/ButtonDelegate.h")

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ ${CMAKE_CURRENT_SOURCE_DIR}/ItemDelegate/)

target_link_libraries(${PROJECT_NAME} PUBLIC Qt6::Widgets Util)